struct A; // concrete type A

struct S(A); // concrete Struct with an elem of type A

struct SGen<T>(T); // Generic type SGen with "T"


fn reg_fn(_s: S) {} 

fn gen_spec_t(_s: SGen<A>) {}

fn gen_spec_i32(_s: SGen<i32>) {}

fn generic<T>(_s: SGen<T>) {}

pub fn main(){
    println!("generic: functions");

    let s = S(A); // init empty type struct S(A)
    reg_fn(s); // ownership moved to function

    let s = SGen(A);
    gen_spec_t(s);// ownership moved to function

    let s = SGen(1);
    gen_spec_i32(s);// ownership moved to function

    let s = SGen(1);
    generic::<i32>(s);// explicityly specified type parameter 'i32'

    generic(SGen('c')); //implicitly specified type paramter 'char'
}
